<%@ page contentType="text/html;charset=GBK"%>
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="com.busi.system.model.SystemMenu"%>
<%@ page import="java.util.Set"%>
<%@ page import="java.util.Iterator"%>
<%@ page import="com.busi.framework.base.CC"%>
<%
	SystemMenu sm = (SystemMenu)request.getAttribute("sm");
	Set secMenuIdInSession = (Set)request.getSession().getAttribute(CC.SET_SEC_MENU_ID);
	Set thrMenuIdInSession = (Set)request.getSession().getAttribute(CC.SET_THR_MENU_ID);

%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title></title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE1 {
	font-size: 12px;
	color: #FFFFFF;
}
.STYLE3 {
	font-size: 12px;
	color: #033d61;
}
.menu_title SPAN {
	FONT-WEIGHT: bold; LEFT: 3px; COLOR: #ffffff; POSITION: relative; TOP: 2px 
}
.menu_title2 SPAN {
	FONT-WEIGHT: bold; LEFT: 3px; COLOR: #FFCC00; POSITION: relative; TOP: 2px
}

.tronclickbg1 {
	background: #fff;
}
.tronclickbg2 {
	background: #79D0FF;
}
-->
</style>

<script>
var he=document.body.clientHeight-105
document.write("<div id=tt style=height:"+he+";overflow:hidden>")
</script>


<body style="overflow:hidden">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;">
  <tr>
    <td width="171" id=frmTitle noWrap name="fmTitle" align="center" valign="top"><table width="171" height="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;">
      <tr>
        <td  bgcolor="#1873aa" style="width:6px;"></td>
        <td width="165">

<table width="165" height="100%" border="0" cellpadding="0" cellspacing="0" style="background: #fff;">
  <tr>
    <td height="28" background="${ctx}/login/frame/images/main_40.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="100%" height="20" align="center"><span class="STYLE1"><%=sm.getCn_name()%></span></td>
      </tr>
    </table></td>
  </tr>

  <tr>
    <td valign="top">
	<table width="151" border="0" align="center" cellpadding="0" cellspacing="0">


	<%
		Set setSecMenu = sm.getSetChildMenu();
		Iterator itrSecMenu = setSecMenu.iterator();
		while(itrSecMenu.hasNext()){
			SystemMenu secMenu = (SystemMenu)itrSecMenu.next();
			if(!CC.CHECK_LEVEL.equals("0")){
				if(secMenuIdInSession.contains(secMenu.getId())){
	%>

      <tr>
        <td>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="23" background="${ctx}/login/frame/images/main_47.gif" id="imgmenu<%=secMenu.getId()%>" class="menu_title" onMouseOver="this.className='menu_title2';" onClick="showsubmenu(<%=secMenu.getId()%>)" onMouseOut="this.className='menu_title';" style="cursor:hand"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="18%">&nbsp;</td>
                <td width="82%" class="STYLE1"><%=secMenu.getCn_name()%></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td background="${ctx}/login/frame/images/main_51.gif" id="submenu<%=secMenu.getId()%>">
			 <div class="sec_menu" >  
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">


				<%
					Set setThrMenu = secMenu.getSetChildMenu();
					Iterator itrThrMenu = setThrMenu.iterator();
					while(itrThrMenu.hasNext()){
						SystemMenu thrMenu = (SystemMenu)itrThrMenu.next();
						if(thrMenuIdInSession.contains(thrMenu.getId())){
				%>
                  <tr id="tabletd<%=thrMenu.getId()%>" class="tronclickbg1">
                    <td width="16%" height="23"><div align="center"><img src="${ctx}/login/frame/images/left.gif" width="10" height="10" /></div></td>
                    <td width="84%" height="23">
					<table width="95%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td height="20" style="cursor:hand;" onclick="toRightFrame('<%=thrMenu.getLink_forward()%>','<%=thrMenu.getId()%>')" onmouseover="this.style.borderStyle='solid';this.style.borderWidth='1';borderColor='#7bc4d3'; "onmouseout="this.style.borderStyle='none'"><span class="STYLE3"><%=thrMenu.getCn_name()%></span></td>
                        </tr>
                    </table></td>
                  </tr>
				<%
						}
					}
				%>

                </table></td>
              </tr>
              <tr>
                <td height="5"><img src="${ctx}/login/frame/images/main_52.gif" width="151" height="5" /></td>
              </tr>
            </table></div></td>
          </tr>
          
        </table></td>
      </tr>
	<%
				}
			}
		}
	%>


    </table></td>
  </tr>
  <tr>
    <td height="4" background="${ctx}/login/frame/images/main_58.gif">
	</td>
  </tr>
</table>


</td>
      </tr>
    </table>		</td>

  </tr>
</table>
</body>
</html>

<script>
function showsubmenu(sid){
	whichEl = eval("submenu" + sid);
	imgmenu = eval("imgmenu" + sid);
	if (whichEl.style.display == "none")
	{
	eval("submenu" + sid + ".style.display=\"\";");
	imgmenu.background="${ctx}/login/frame/images/main_47.gif";
	}
	else
	{
	eval("submenu" + sid + ".style.display=\"none\";");
	imgmenu.background="${ctx}/login/frame/images/main_48.gif";
	}
}
var lastMenuId = 0;
function toRightFrame(linkforward , id){
	if(lastMenuId != 0){
		var tabletr = document.getElementById("tabletd"+lastMenuId);
		tabletr.className ="tronclickbg1";		
	}
	var tabletr = document.getElementById("tabletd"+id);
	tabletr.className ="tronclickbg2";
	lastMenuId = id;
	window.top.frames['midFrame'].location = linkforward;
	
}
var curSecMenuUrl = "<%=sm.getLink_forward()%>";
window.top.frames['midFrame'].location = curSecMenuUrl;
</script>